<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>首页</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<link rel="stylesheet" type="text/css" href="css/animate.css" />
		<script src="js/utils.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div class="indexWeb">
			<div class="header">
				<audio id="bgMusic" loop="loop" >
					<!--音乐兼容性-->
					<source src="media/bgm.mp3" type="audio/ogg"></source>
					<source src="media/bgm.mp3" type="audio/mpeg"></source>
				</audio>
				<img src="img/zhurenmingdan/yinyue1.png" class="yin1" />
			</div>
			<div class="content">
				<div class="logo">
					<img src="img/index/logo.png" />
				</div>
				<p>你办囍事</p>
				<p>我送囍酒</p>
				<button>定制我的囍宴</button>
				<button>我要免费领囍酒</button>
			</div>

			<!---弹出层--->
			<div class="shade">
				<div class="text">
					<div class="close">
						<img src="img/index/close.png" />
					</div>
					<p>定制专属囍宴</p>
					<p>邀请宾客入席</p>
					<p>抢999元现金贺礼！</p>
					<button><a href="activity_Rules.html">查看活动规则</a></button>
				</div>
			</div>
		</div>

		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(".shade .text .close").on("click", function() {
				$(".shade").css("display", "none");
			})
			$(".header").on("click", function() {
				if($(this).find("img").attr("src") == "img/zhurenmingdan/yinyue1.png") {
					$(this).find("img").attr("src", "img/zhurenmingdan/yinyue2.png")
					$(this).css("animation-play-state", "paused")

				} else {
					$(this).find("img").attr("src", "img/zhurenmingdan/yinyue1.png")
					$(this).css("animation-play-state", "running")
				}
			})
			document.getElementById("bgMusic").play(); 
			document.addEventListener("WeixinJSBridgeReady", function() {
				document.getElementById("bgMusic").play(); //视频自动播放
			}, false);
			var music = document.getElementById("bgMusic");
			$(".header").click(function() {
				if(music.paused) {
					music.play();
				} else {
					music.pause();
				}
			});
			$(".content button:first").on("click",function(){
//				location.href = "seat.html";
				$(".shade").css("display","block");
			})
			$(".content button").eq(1).on("click",function(){
				location.href = "receive.html";
			})
		</script>
	</body>

</html>